<template>
    <div>
        pageB
        {{$store.state.count.count}}
        <button @click="add(2)">增加</button>
        <button @click="reduce">删除</button>
    </div>
</template>

<script>
    import {mapActions} from 'vuex';

    export default {
        //对应指定的模块
        methods: mapActions('count', ['add', 'reduce'])
    }
</script>